<div class="row-fluid">	
<div class="box span12">
    <div class="box-header">
        <h2><i class="icon-align-justify"></i><span class="break"></span>用户资料修改</h2>
        <div class="box-icon">
            <a href="#" class="btn-minimize"><i class="icon-chevron-up"></i></a>
            <a href="#" class="btn-close"><i class="icon-remove"></i></a>
        </div>
    </div>
    <div class="box-content">
        <form id="userinfogs" class="form-horizontal" role="form" method="POST" action="<?php echo url_for('user/saveuserinfo?id='.$user_id)?>">
        <table class="table table-bordered table-striped table-condensed">
              <thead>
                  <tr>
                      <th style="width:10%">帐号属性</th>
                      <th>值</th>                         
                  </tr>
              </thead>   
              <tbody>
                <tr>
                    <td>帐号：</td>
                    <td class="center"><?php echo $user->getUserName(); ?></td>                           
                </tr>    
                <tr>
                    <td>性别：</td>
                    <td class="center">
                      <select Class="form-control" id="sex" name="sex">
                          <option value="1" <?php if($user->getSex()==1): ?>selected = "selected"  <?php endif;?> >男</option>
                          <option value="0" <?php if($user->getSex()==0): ?>selected = "selected"  <?php endif;?> >女</option>
                          <option value="2" <?php if($user->getSex()==2): ?>selected = "selected"  <?php endif;?> >未知</option>
                      </select>
                    </td>                       
                </tr>
                <tr>
                    <td>年龄：</td>
                    <td class="center"><input type="text" name="age" value="<?php echo $user->getAge(); ?>"/></td>                           
                </tr>
                <tr>
                    <td>角色：</td>
                    <td class="center">
                      <select Class="form-control" id="role" name="role">
                          <option value="1" <?php if($user->getRole()==1): ?>selected = "selected"  <?php endif;?> >借贷方</option>
                          <option value="0" <?php if($user->getRole()==0): ?>selected = "selected"  <?php endif;?> >投资方</option>
                      </select>
                                        
                </tr>
                <tr>
                    <td>注册来源：</td>
                    <td class="center"><input type="text" name="regfrom" value="<?php echo $user->getRegFrom(); ?>"/></td>                           
                </tr>
                
                <tr>
                    <td>真实姓名：</td>
                    <td class="center"><input type="text" name="name" value="<?php echo $userattrs['name']; ?>"/></td>                           
                </tr>
                
                <tr>
                    <td>户籍省份：</td>
                    <td class="center"><input type="text" name="provinces" value="<?php echo $userattrs['provinces']; ?>"/></td>                           
                </tr>
                <tr>
                    <td>注册手机：</td>
                    <td class="center"><input type="text" name="phone" value="<?php echo $userattrs['phone']; ?>"/></td>                           
                </tr>
                <tr>
                    <td>邮箱：</td>
                    <td class="center"><input type="text" name="email" value="<?php echo $userattrs['email']; ?>"/></td>                           
                </tr>
                <tr>
                    <td>身份证：</td>
                    <td class="center"><input type="text" name="id_card" value="<?php echo $userattrs['id_card']; ?>"/></td>                           
                </tr>
                <tr>
                    <td>婚姻状况：</td>
                    <td class="center">
                         <select Class="form-control" id="EducationId" name="marray_status">
                          <?php foreach ($marray_status as $one=>$v): ?>
                              <option value="<?php echo $one; ?>" <?php if($userattrs['marray_status']==$one): ?>selected = "selected"  <?php endif;?> ><?php echo $v; ?></option>
                          <?php endforeach; ?>
                          </select>
                    </td>                           
                </tr>
                <tr>
                    <td>教育程度：</td>
                        <td class="center">
                      <select Class="form-control" id="EducationId" name="edu_status">
                          <?php foreach ($edu_status as $one=>$v): ?>
                              <option value="<?php echo $one; ?>" <?php if($userattrs['edu_status']==$one): ?>selected = "selected"  <?php endif;?> ><?php echo $v; ?></option>
                          <?php endforeach; ?>
                          </select>
                    </td>                           
                </tr>
                <tr>
                    <td>住房状况：</td>
                        <td class="center">
                      <select Class="form-control" id="EducationId" name="residence_status">
                          <?php foreach ($residence_status as $one=>$v): ?>
                              <option value="<?php echo $one; ?>" <?php if($userattrs['residence_status']==$one): ?>selected = "selected"  <?php endif;?> ><?php echo $v; ?></option>
                          <?php endforeach; ?>
                          </select>
                    </td>                           
                </tr>
                <tr>
                    <td>是否购车：</td>
                        <td class="center">
                      <select Class="form-control" id="role" name="has_cart">
                          <option value="1" <?php if($user->getRole()==1): ?>selected = "selected"  <?php endif;?> >没车</option>
                          <option value="0" <?php if($user->getRole()==0): ?>selected = "selected"  <?php endif;?> >有车</option>
                      </select>
                    </td>                           
                </tr>
                <tr>
                    <td>QQ：</td>
                    <td class="center"><input type="text" name="qq" value="<?php echo $userattrs['qq']; ?>"/></td>                           
                </tr>
                <tr>
                    <td>住宅电话：</td>
                    <td class="center"><input type="text" name="home_telephone" value="<?php echo $userattrs['home_telephone']; ?>"/></td>                           
                </tr>
                <tr>
                    <td>住宅地址：</td>
                    <td class="center"><input type="text" name="home_address" value="<?php echo $userattrs['home_address']; ?>"/></td>                           
                </tr>
                <tr>
                    <td>第二联系人姓名：</td>
                    <td class="center"><input type="text" name="second_contact_name" value="<?php echo $userattrs['second_contact_name']; ?>"/></td>                           
                </tr>
                 <tr>
                    <td>第二联系人关系：</td>
                        <td class="center">
                      <select Class="form-control" id="SecondRelationShipId" name="second_contact_relation"><option value="">请选择</option>
                         <?php foreach ($relations_status as $relations=>$v): ?>
                            <option value="<?php echo $relations; ?>" <?php if($userattrs['second_contact_relation']==$relations): ?>selected = "selected"  <?php endif;?> ><?php echo $v; ?></option>
                        <?php endforeach; ?>

                    </select>
                    </td>                           
                </tr>
                 <tr>
                    <td>第二联系人电话：</td>
                    <td class="center"><input type="text" name="second_contact_phone" value="<?php echo $userattrs['second_contact_phone']; ?>"/></td>                           
                </tr>
                 <tr>
                    <td>第三联系人姓名：</td>
                    <td class="center"><input type="text" name="three_contact_name" value="<?php echo $userattrs['three_contact_name']; ?>"/></td>                           
                </tr>
                <tr>
                    <td>第三联系人关系：</td>
                        <td class="center">
                      <select Class="form-control" id="ThirdRelationShipId" name="three_contact_relation"><option value="">请选择</option>
                        <?php foreach ($relations_status as $relations=>$v): ?>
                            <option value="<?php echo $relations; ?>" <?php if($userattrs['three_contact_relation']==$relations): ?>selected = "selected"  <?php endif;?> ><?php echo $v; ?></option>
                        <?php endforeach; ?>
                    </select>
                    </td>                           
                </tr>
                <tr>
                    <td>第三联系人电话：</td>
                    <td class="center"><input type="text" name="three_contact_phone" value="<?php echo $userattrs['three_contact_phone']; ?>"/></td>                           
                </tr>
                
              </tbody>
         </table>
        <div class="col-xs-offset-2 col-xs-4">
                    <input type="submit" id="BtnContacts" class="btn btn-primary" value="保 存 "/> 
                </div>
    </form>
    </div>
</div>
</div>

